<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<style lang="css">
  @import url(https://fonts.googleapis.com/css?family=Lato);

  body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: Lato, sans-serif;
    background: #03a9f4;
  }

  nav.navtab {
    --navtab-width: 600px;
    --navtab-item-width: calc(var(--navtab-width) / 4 - 20px);
    --navtab-overlay-width: calc(var(--navtab-item-width) + 80px);
    --active-index: 0;
    position: relative;
    width: var(--navtab-width);
    height: 150px;
    background: white;
    border: 1em solid white;
    border-radius: 5% 5% 15% 15% / 15% 15% 50% 50%;
    overflow: hidden;
  }

  nav.navtab ul {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    list-style-type: none;
  }

  nav.navtab ul li.navtab-item {
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    flex-direction: column;
    width: var(--navtab-item-width);
    height: 100%;
    color: #0288d1;
    cursor: pointer;
    transition: 0.5s ease;
  }

  nav.navtab ul li.navtab-item i {
    font-size: 2em;
    transition: 0.5s ease;
  }

  nav.navtab ul li.navtab-item span {
    font-size: 20px;
    user-select: none;
    opacity: 0;
    transition: 0.5s ease;
  }

  nav.navtab ul li.navtab-item.active {
    width: var(--navtab-overlay-width);
  }

  nav.navtab ul li.navtab-item.active i {
    transform: translateY(-10px);
  }

  nav.navtab ul li.navtab-item.active span {
    opacity: 1;
  }

  nav.navtab::after {
    position: absolute;
    content: "";
    top: 0;
    left: 0;
    height: 100%;
    width: var(--navtab-overlay-width);
    background: #b3e5fc;
    border-radius: 20px;
    transform: translateX(calc(var(--navtab-item-width) * var(--active-index)));
    transition: 0.5s ease;
  }
</style>

<body>
  <nav class="navtab">
    <ul>
      <li class="navtab-item active">
        <i class="fas fa-home"></i>
        <span>Home</span>
      </li>
      <li class="navtab-item">
        <i class="fas fa-compass"></i>
        <span>Explore</span>
      </li>
      <li class="navtab-item">
        <i class="fas fa-bell"></i>
        <span>Notification</span>
      </li>
      <li class="navtab-item">
        <i class="fas fa-user"></i>
        <span>Profile</span>
      </li>
    </ul>
  </nav>

</body>
<script>
  var navtab = document.querySelector("nav.navtab");
  var navtabItems = document.querySelectorAll("li.navtab-item");
  navtabItems.forEach(function (navtabItem, activeIndex)
  {
    return navtabItem.addEventListener("click", function ()
    {
      navtabItems.forEach(function (navtabItem) { return navtabItem.classList.remove("active"); });
      navtabItem.classList.add("active");
      navtab.style.setProperty("--active-index", "" + activeIndex);
    });
  });

</script>

</html>